home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ATTRIBUTES OF POWER
- (C) Copyright 1986 Brian Murphy
- ATTRIBUTES OF POWER
- Copyright (c)1986 Brian Murphy
-
-
- TABLE OF CONTENTS
-
-
- Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
- Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
- Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
- Attribute/Command symbols . . . . . . . . . . . . . . . . . . . . 3
- Search/Set symbols . . . . . . . . . . . . . . . . . . . . . . . . 4
- Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
- Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
- Notes On the D,V,X, and Y Attributes . . . . . . . . . . . . . . . . . 10
- Specific Effects Of Attributes . . . . . . . . . . . . . . . . . . . . 11
- Sample outputs of "dir" and "AT" . . . . . . . . . . . . . . . . . . . 13
-
- This program requires DOS 2.0 or above and a display width of 80 characters per
- line for proper operation.
-
-
- RIGHTS, RESPONSIBILITIES, INFORMATION, AND OF COURSE: THAT LEGAL STUFF
-
- This program is distributed under the "Userware" concept. This means that
- you are free to use, copy, and distribute the program and its associated files
- free of charge. What the author of the program asks in return is that you send
- a registration fee of an amount which you feel appropriate for the program ($10
- suggested).
- Of course you are under no obligation to send in this registration fee.
- Not doing so will in no way interfere with your right to use and distribute
- copies of the program. But look at it from the programmer's point of view. A
- lot of time went into development and testing of this program, as well as money
- to find the best compiler for the job to make the final product as quick and
- painless for YOU to use as possible. Surely $10 is not to much to ask for in
- return. After all, while public domain programs are for your use, the people
- who create the truly useful programs are going to get tired of taking the time
- and effort to make programs which the PC world NEEDS, and distribute them free
- of charge, if they are not rewarded in some small way for their efforts.
- Please take the time NOW to send your registration check to:
-
- Attributes Of Power
- c/o Brian Murphy
- 711 Arch #304
- Ann Arbor, MI 48104
-
- -----
-
- Copyright Notice:
-
- ATTRIBUTES OF POWER (AT) AND THE ASSOCIATED MANUAL are (C) Copyright 1986
- by Brian Murphy. AT, and the accompanying user manual may not be modified or
- distributed in modified form without the express written permission of Brian
- Murphy. Furthermore, AT and its manual, or any modified derivative thereof may
- NOT be sold, or distributed as a bonus accompanying the sale of third party
- hardware or software.
-
- -----
-
- Disclaimer:
-
- AT and its manual are distributed without guarantee. Responsibility lies
- solely with the user. Brian Murphy shall not be held responsible for any
- damage incurred by the use of AT or the manual to hardware, software,
- peripheral device, or any loss of productivity or profit resulting from the use
- of this software.
-
- -----
-
- FYI:
-
- AT was developed on a Compaq Deskpro 286 using the small version C
- compiler: "Mark William's Let's C". This compiler was used because it resulted
- in execution speeds ~40% faster than the same program compiled with Microsoft's
- V3.0 C compiler.
- The manual was written using Word Perfect 4.0
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 1
-
-
- Quick overview of ATTRIBUTES OF POWER:
-
- In a nut shell ATTRIBUTES OF POWER, besides giving you a wealth of
- information beyond that given by the normal DOS "dir" command, also gives you
- complete control over the file/system attributes which DOS supports but hasn't
- made available to the general user. The control of attributes such as the
- read-only attribute, which protects your files from accidental erasure and
- alteration, or the archive attribute which allows custom tailoring of files to
- be archived with DOS's "backup" and "restore" commands, or the hidden attribute
- which allows you to eliminate the utility files which continually swamp out the
- files you really want to see in your "dir" listings, is the kind of control AT
- puts at your fingertips.
- Of course there are several programs currently available which allow one
- to change the attributes of files, so what makes AT so unique? AT is the only
- program which allows you to perform directory searches and subsequent attribute
- modifications based on file specifications, attribute specifications, or
- combinations of both. This ability, coupled with the ease of issuing multiple
- attribute setting commands from a single command line, gives you the added
- control and flexibility which is necessary for full and easy use of the
- attributes on your system, allowing you to capitalize on the options which come
- with such added potential. With this program you have complete control over
- the attributes which the operating system has supported all along, but which
- have been out of reach because until now you, the user, had been provided with
- no simple method for manipulating them.
-
-
- Installation:
-
- Fixed Disk:
-
- If you have a hard disk, you should copy AT to the directory which
- contains DOS.
- If you do not have a DOS directory, the easiest thing to do is to copy AT
- to the fixed disk's root directory; for example, put the AT disk into drive A
- and type: "copy a:\at.exe c:\" (assuming your hard disk is drive C). In
- addition, you should use the "path" command to specify the root directory of
- you hard disk as part of your command search path. This may be done as
- follows: If you have a "path" command in an autoexec.bat file on your hard
- disk's root directory, append the following to it: ";C:\" so it would look like
- "PATH=(whatever you had previously)\;C:\" (again assuming your hard disk is
- drive C). If you have an autoexec.bat file, but do not have a path command in
- it, add the line "PATH=C:\" to it. If you do not have an autoexec.bat file in
- the root directory of your hard disk you may create one by typing the
- following:
-
- C:{Enter} (Assuming your hard disk is drive C.)
- cd\{Enter}
- copy con autoexec.bat{Enter}
- path=C:\{Enter} (Again, assuming C is your hard disk.)
- ^Z{Enter} (Press CTRL and Z simultaneously, or F6.)
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 2
-
-
- Floppy Disk:
-
- Copy AT to the floppy disk where you want to use it. In most cases this
- will be your working DOS diskette. For example, if your DOS diskette is in
- drive A, put the AT diskette in drive B and type "copy b:\at.exe a:\".
-
- Note:
-
- AT, like any program, will only run if it is 1) in the current working
- directory, or 2) if it is in the command path search set by the "path" command.
- If one of these criteria are not met, when you type AT{enter} you will get the
- following message: "Bad command or file name". To correct this problem you
- must change either the command search path, or copy AT.EXE to the current
- working directory.
-
-
- TEST SPIN:
-
- You can use AT in many ways, the easiest of which is just like the DOS
- "dir" command. Simply type "AT" and return.
-
- On a more advanced level you can use AT in conjunction with specific
- search patterns you create to look for filespec/attribute combinations, and, at
- your option, change the attributes on files which match those search patterns.
- Below is an example of how AT works which shows how to set the read-only
- attribute on the installed copy of AT and thus make it immune to accidental
- erasure or modification.
-
- Change AT's attributes:
-
- To protect AT now that it is on the disk where you will be using it, make
- sure that disk is the current default disk, and that AT.EXE is in the current
- default directory (both conditions are met if you see AT.EXE when you get a
- "dir" listing) and type the following:
-
- at at.exe /+r{Enter}
-
- This command will invoke AT and cause it to set the read-only attribute on
- AT.EXE while telling you it has done this by placing a "*" at the end of
- AT.EXE's attribute listing line.
-
- Congratulations! With this one simple command you have demonstrated all
- the skills necessary to use AT.
-
-
-
- What follows are the details of running AT by specifying search
- parameters, an explanation of AT's output, and definitions of specific
- attributes and their functions; but remember, anytime you want a directory
- listing, just type AT!
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 3
-
-
- USAGE:
-
- 1) AT {Enter} Nice and simple, like "dir", or . . .
- 2) AT filespec {Enter} and still on comfortable ground, or . . .
- 3) AT [filespec] [/{*=~/+-rashvdxycwb]}{...}. .] {Enter} and POWER!
-
- Command: What it does:
-
- 1) AT Expands to AT *.*; gives complete listing of current
- directory.
-
- 2) AT filespec Expands to AT filespec, (or filespec.* if you do not supply
- a file extension). Note that this method of extension
- expansion is slightly different from DOS's "dir" in one
- respect: with this convention c:\path1\path2 expands into
- c:\path1\path2.* "look for file path2 in directory path1"
- instead of DOS's "look in directory path2 for any files".
- If this is what you mean, you must enter c:\path1\path2\
- Other than this AT works with file names the same way
- DOS's "dir" command does.
-
- 3)
- The third command format, which is where AT is at its best, has an added
- element which the first two formats do not, and that is the command field.
- The command field is composed of combinations of two kinds of symbols, the
- attribute/command symbols, and the search/set symbols. The attribute/command
- symbols tell AT what attributes you want to look for, the search/set symbols
- tell AT how to look for these attributes (e.g. find any file which has all
- specified attributes, or find any file which has none of the specified
- attributes), and what you want to do with the matching files found (set or
- reset specified attributes).
-
- Attribute/Command symbols:
-
- attributes:
-
- r - read only s - system h - hidden v - volume
- a - archive d - directory x - Xunused y - Yunusd
-
- commands:
-
- b - blank w - wide c - clear
-
-
-
- Note: See the section titled "Specific Effects Of Attributes" for an
- explanation of what specific attributes are used for. Also, be aware that the
- attributes X and Y are unused by the current version (3.1) of DOS. As soon as
- a version of DOS is released which allows you to manipulate them, this program
- is written to allow you to do so.
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 4
-
-
- The "b","w","c" command symbols are not attributes. They are commands to
- AT. The 'b' command tells AT to look for files which have no attributes set
- ("b"lank). The 'w' symbol ("w"ide) tells AT to give a condensed report,
- omitting a display of individual file times, dates, sizes, slack, etc. This
- mode is like the "dir /w" report. For the individual files, all you get are
- the file names and their attributes. The 'c' symbol ("c"lear) tells AT to
- clear the attributes of all the files it finds. This is the only symbol of the
- attribute/command symbol group which alters the attributes of files.
-
- The symbols which control the searches are listed below. All symbols may
- be used in any logical combination (and AT can figure out most illogical
- combinations as well). If you specify more than one condition in the command
- field, only files which meet all the conditions will be listed. The best way
- to figure out how AT works is to look at the examples which follow, and play
- (on a spare floppy if you feel uneasy).
-
-
- Attribute Search/Set Symbols:
-
- In what follows, xxx represents an arbitrary combination and number of the
- attribute characters "rhshavdxy". You should specify at least one attribute
- after a search/set symbol, but may specify more. Note that the command field
- must begin with a "/".
-
- / : /xxx -> search for files with any of the specified attributes. The "/"
- may be omitted if the xxx characters immediately follow the
- command "/".
- + : +xxx -> set the listed attributes.
- - : -xxx -> reset the listed attributes.
- ~ : ~xxx -> search for files which do not have any of the listed individual
- attributes.
- = : =xxx -> search for files which only have all of the listed attributes.
- ~= : ~=xxx -> search for files which do not contain this complete block of
- attributes.
- =~ : =~xxx -> (same as ~=).
- * : *xxx -> search for files which have at least all of the listed
- attributes.
-
-
-
-
- The attribute/command and search/set symbols may be combined in many
- ways. Following is a very small sampling of the possibilities.
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 5
-
-
- EXAMPLES:
-
- Note: the examples do not take into account the 'x', and 'y' attributes
- since they are currently not used. An extension to the use of these attributes
- requires no more than a straightforward application of the principles
- illustrated below with the attributes currently available.
-
- at /~hsv
-
- This says: "List any files in the current default directory which do not
- have either the 'h','s', or 'v' attributes." This command combination gives a
- listing which is the equivalent of DOS's "dir". Only files with a combination
- of the 'a','r', or 'd' attributes (and no others) are listed.
-
- at /a
-
- This says: "Look in the current default directory, and list any files
- which have the 'a' (plus any other attributes) set". If you have not purposely
- manipulated the 'a' attribute of these files, such a listing would show you all
- the files on your disk in the current root directory which have been created or
- modified since they were last backed up with DOS's "backup" command.
-
- at /dhs
-
- This says: "Look in the current default directory, and list all
- subdirectories which have been hidden with the 'h', 's', or both attributes."
-
- at c:\123\ /c
-
- This says: "Clear the attributes of all files in the C:\123 directory."
- The command is handy if you want to eliminate a subdirectory. This will turn
- off all read-only, hidden, and system attributes of all files in the directory,
- thus allowing you to delete them with a single "del *.*". Note that if you
- didn't have AT, and a commercial program had transferred hidden files to a
- directory (as many do), you would be unable to erase that directory. Some
- people have faced this maddening experience: the "dir" command shows the
- directory as being empty, but when you try to erase the directory with "rd" DOS
- tells you the directory isn't empty. With AT such paradoxes vanish with a few
- keystrokes. Without AT you would be stuck. Period.
-
- at /a~r-a+r
-
- This says: "Look in the current default directory for any files which have
- the 'a' attribute, plus any other attributes besides the 'r'. For those files,
- turn 'a' off, and turn 'r' on". A similar command is "at /a~rc+r". There is a
- difference though: the former command turns only the 'a' attribute off, and
- sets the 'r'. The latter turns all attributes off and sets the 'r'. This is
- an easy way to find out which files are new or which have been modified in a
- directory, but are currently not write protected, and then protect them from
- accidental erasure or modification.
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 6
-
-
- at c: /=shrc+r
-
- This says: "Look in the C: default directory. If there are any files
- which have both attributes 's','h','r' and no others, clear these attributes
- and make the files read only". Note that the 'c' command is always executed
- first, so "at c: /=shr+rc", "at c:/=cshr+r", and at "c: /c=shr+r" all have the
- same effect. This command would effectively unhide the write protected hidden
- and system files in the directory, while still protecting them from accidental
- erasure or modification. An equivalent command would be "at c: /=shr-sh".
-
- at data /b+a
-
- This says: "Look for all files of the form 'data.*' in the current
- directory which have no attributes set and turn on their 'a' attribute."
- The 'b' command, like the 'c' command, is always executed first, so the
- commands "c: /+ba", and "c: /+ab" would have the same effect as the one above.
-
- at /*sh-s
-
- This says: "Look for all files in the current directory which have both
- the 's' and 'h' attributes, as well as any others, and turn the 's' attribute
- off. Files with an 'h' but not 's', or an 's' but no 'h', or neither an 's' or
- 'h' will not be affected.
-
- at data path1\path2\ /+sh-ac
-
- This says: "Look for data.* in '(current drive\directory)\path1\path2\*.*'.
- For all files of that form in that directory, clear their attributes and turn
- on the 's','h' attributes and turn off the a attribute". Note the -a is really
- not needed because the 'c' turns off all attributes on the specified files.
-
- at accounts /d+h
-
- This says: "Look for any subdirectories in the current directory named
- 'accounts' (while ignoring any files of the form 'accounts.*') and turn on the
- 'h' attribute." This will effectively hide the "accounts" directory from any
- normal DOS "dir" listings. The subdirectory may still be entered via "cd" as
- usual if you know it's name, and will be backed up as normal with the DOS
- "backup" command.
-
- at /+wr~c=rh
-
- This is an exemplary bit of illogic, if ever there was one, to give you an
- idea of how AT goes about deciphering the command line. Despite the confusion,
- AT knows what you meant (do you?). It knows you mean: "Search for all files
- which satisfy "~=rh", "c"lear them and turn on 'r'. Finally, print out the
- results in wide format.
- You didn't really think it mean turn on the 'w' and 'r' attributes for any
- file which doesn't have the 'c' attribute and has only the 'r','h' attributes
- did you?
-
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 7
-
-
- This brings us to a the way AT parses you command line. All commands are
- initiated with the "/". Without this, AT will ignore whatever you type after
- the first field following "AT". Once AT encounters the "/", it knows you're
- issuing a command and sets about deciphering it. When AT encounters one of the
- search/set mode indicators (=,/x,*,+,-,~), it treats all attribute letters
- following that symbol as belonging to it. Things proceed in this manner until
- another search/set mode indicator is encountered. Then the following attribute
- letters correspond to that mode, and so on. The special command symbols 'b',
- 'c', and 'w'. are noted when AT finds them, but since they are not attribute
- letters they are ignored, or considered invisible, to the part of AT which is
- associating attributes with mode/set indicators.
- Because of this way of parsing the command line, the order in which
- commands are issued does not matter, so "AT /=rh+a-s", "AT /-s+a=rh", and "AT
- /+a+rh-s", etc. are equivalent. What counts is what letters follow the
- previous set/mode symbol.
- As mentioned earlier the 'c' and 'b' command are always executed before
- any others, so a command of the form "/+ac+h" does not set the 'a' attribute,
- then clear it and set the h attribute. This command would clear all attributes
- and then set the h & a attributes.
-
-
-
- ERROR MESSAGES:
-
- If you issue commands which contain illegal characters, AT will prompt you
- with an error message which shows you the command you tried, and the illegal
- characters [within square brackets]. AT will not, however, balk at obviously
- meaningless expression such as "AT /=a~a" which tell it to "search for all
- files which have only the 'a' attribute, but which do not have the 'a'
- attribute." AT will proceed as usual and simply give you the "No files found"
- message.
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 8
-
-
- OUTPUT:
-
- Below is an explanation of the output you get in the various AT modes.
- For a visual guide to go along with the explanations, see the sample AT
- listings at the end of this manual.
-
-
- VOLUME LABEL:
-
- First AT prints the Volume label (if any) of the media (disk) you are
- reading from. If there is no label, you are told that.
-
-
- PATH SPECIFICATION:
-
- Next comes the path specification. This tells you the device, path,
- and file name you told AT to look for. All components (such as device,
- path, etc) default to their current values if not specified. Note that
- the path listing also displays any wildcards you may have specified in
- your original command. Contrast this to the "dir" path listing which says
- "Directory of A:\ACCOUNTS" whether you typed "dir a:\accounts" or "dir
- a:\accounts\paid.up". This is useful if you make printed directory
- listings for reference or distribution. Now you will know if the
- directory listing you hold in you hand is of a complete directory, or a
- partial one.
-
-
- COMMAND FIELD:
-
- Following the path display, AT prints the commands you gave it (if
- any) in between the "[...]" symbols.
-
-
- INDIVIDUAL FILE LISTINGS:
-
- ATTRIBUTE LINE:
-
- Next comes the file listings, which begin with the attribute line.
- This line has a "_" in places where no attributes are present, or a
- character representing attributes which are set. Following this line,
- depending on the command you issue, you may see the file name, a "*", or
- an "E". If one of these single character symbols is present, It mean you
- issued a "change attributes" command, and AT is letting you know the
- results of that command.
- Whenever AT changes the attributes of a file, it puts a "*" next to
- the attribute line of the file whose attributes were changed. The
- attributes listed are the new attributes. If AT tries to change the
- attributes of a file and DOS won't let it, instead of the "*", a "E"
- appears with the file's current attributes. If you order the attributes
- on a file changed, and no "*" appears, that means the file was already set
- to the attributes you specified.
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 9
-
-
- FILESPEC, TIME, DATE:
-
- Next come the File Name and File Extension (or <DIR> if file is a
- directory). If you did not specify the wide mode you will also see: "Time
- of file creation" (identical to "dir" except for the listing of the day
- and month in English (note "dir" doesn't even give you the day of the
- week)).
-
-
- FILE SIZE, %LAST CLUSTER SLACK:
-
- The final entries on the individual file line are the size of the
- file in bytes, and %Last Cluster Slack.
- The %Last Cluster Slack following each file size is the amount of
- disk space which is slack (i.e. unoccupied but unusable) associated with
- the particular file. Disk space is parcelled out by DOS in units of fixed
- number of bytes (called clusters), so if a file's size doesn't go into
- this allocation size exactly, some of the allocated space will be unused.
- The %Last Cluster Slack is simply the % unused space in the last cluster
- the file occupies. For example, If a file is 700 bytes long, and the disk
- space is allocated in clusters of 512 bytes, then the file requires 2
- clusters (1024) bytes because one cluster is not large enough to contain
- it. Thus with two clusters taken, 324 bytes (1024 - 700) will be unused,
- and the last cluster will be 36.7% slack.
-
- DIRECTORY SUMMARY INFORMATION:
-
- CURRENT DATE/TIME:
-
- At the bottom of the listing you are given the current date/time in
- the same format as for individual files.
-
-
- TOTAL BYTES IN FILES/SLACK:
-
- Next comes the total number of bytes in the files (actual file sizes,
- not bytes occupied on the disk), and the total number of bytes slack.
- Both byte totals are given in bytes and KB. The file totals appear first
- (under the listing of individual file sizes in AT's normal mode). The
- slack totals appear next (under the %Last Cluster Slack numbers of the
- individual listings in AT's normal mode).
-
- FOUND FILE CATEGORIES, FILE CHANGED COUNT, LISTING SLACK:
-
- Following this is a count of the total number of files found, the
- number of real files found (non-directory, non-volume files), the number
- of files changed (if any) and the %Slack for the total listing (This
- %Slack is calculated slightly differently than that for the individual
- listings. Instead of being the %Slack of the last cluster, this %Slack is
- the %unused disk space with respect to the total disk space (slack and
- data) occupied by the listed files).
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 10
-
-
- DISK STATISTICS:
-
- Lastly AT gives you information about the disk from which the
- directory listing was obtained. It gives you the amount of free space in
- bytes, KB, and % free formats.
- The last numbers given, contained in square brackets, tell you the
- base capacity of the drive (lo and behold! a 360KB drive doesn't give you
- 360KB of usable file space), and the number of bytes in one allocation
- unit (cluster, abbreviated "clust"). Note that this cluster size is the
- one used to calculate the %Last Cluster Slack. It is the minimum number
- of bytes the disk can give away when DOS asks for storage space.
-
-
-
-
- NOTES ON THE D, V, X, AND Y ATTRIBUTES:
-
- Currently (DOS 3.1 or earlier), DOS will not let you set the d,v,x,or y
- attributes. There are good reasons for this. To unset/set the 'd' attribute
- would be suicide in the sense that suddenly your directory, and all its
- contents, would no longer exist as far as DOS was concerned, or a new directory
- would be indicated where DOS had no record of one, which drives DOS crazy. On
- the other hand, you can set the 'a','r','s', and 'h' attributes on a
- subdirectory. The effects of these attributes on a subdirectory is discussed
- in the section titled "Specific Effects Of Attributes".
- As far as the 'v' attribute is concerned, one could get around DOS by
- direct reads and writes to the disk and set the 'v' attribute, but again, this
- could only mess things up as files with this attribute must have zero length
- and thus cannot be created by conventional means at our disposal. Unlike the
- case with the 'd' attribute, other attributes may not be set on an entry which
- has the 'v' attribute.
- Similarly, you could get around DOS and set the 'x', and 'y' attributes.
- I have done this as an experiment, and AT indicates their presence (without any
- apparent disastrous consequences). However, I am betting that since DOS
- doesn't let you at these bits in a civilized manner, the mighty makers of DOS
- don't want you fooling around with them yet. Perhaps in the future these
- attributes will be given the meaning "on power up, search for any files with
- these attributes and erase them." So, to play it safe, this program only lets
- you access the things DOS consents to letting you at. In the future, if DOS is
- written to allow access to the 'x' and 'y' attributes, you will not be left out
- in the cold. AT will ask DOS, DOS will say yes, and AT will go ahead and
- change them; so in this sense you have a program designed to take advantage of
- attributes not even implemented yet!
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 11
-
-
- SPECIFIC EFFECTS OF ATTRIBUTES:
-
-
- r - READ ONLY
-
- The file cannot be erased or modified when this attribute is set, thus
- protecting it from such commands as "del" and "edlin" (you may edit such a file
- with "edlin", but when you go to end the session with the "e" command, which
- normally saves the changes, DOS responds with an error message and the original
- file is not modified). The file may be renamed, however the renamed file will
- still carry the 'r' attribute. Finally, you can copy a file with the 'r'
- attribute to another file. In this case the copied file will not have 'r' set
- while the original remains unaffected.
- Trying to erase a file with the 'r' attribute results in the message
- "Access denied"; trying to write over the file with another file of the same
- name results in the message "File creation error". If an applications program
- attempts to modify the file, it will be denied access. The error message you
- will get in this situation depends upon the way the program is set up to deal
- with such events.
- This attribute may also be set on subdirectories, but it has no effect on
- DOS; such directories can still be removed with the "rd" command. However,
- setting this attribute on a directory could useful as a method of flagging the
- directory to signal something about the directory or its contents.
-
-
- a - ARCHIVE
-
- Under normal DOS operation this attribute is automatically set on a file
- when it is created or modified. It also has significance in conjunction with
- DOS's "backup" and "restore" commands.
- The backup command uses the archive attribute with its two options "/m"
- (backup only files which have changed since the last backup), and "/d" (backup
- only files which have changed since a given date). The way DOS determines
- whether or not a file has been modified is by examining its archive attribute.
- If this attribute is set, DOS considers the file as having been changed.
- The restore command uses the archive attribute with the "/p" (have DOS
- prompt you for confirmation before restoring files which have changed since the
- last backup). Again, the way DOS determines whether or not a file has changed
- is by examining the file's archive attribute.
- This attribute may also be set on a directory, but it has no meaning to
- DOS. As with the 'r' attribute, however, you could use the 'a' attribute on a
- directory to distinguish it from others for whatever reason you might have.
-
-
- d - DIRECTORY
-
- This attribute indicates that the directory entry associated with it is
- actually that of another directory (subdirectory). You cannot set or unset
- this attribute with AT. You may, however, set the 'r','a','s', and 'h'
- attributes on a directory entry. Look under a specific attribute to see its
- effects when applied to a subdirectory.
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 12
-
-
- v - VOLUME LABEL
-
- This attribute indicates that the directory entry is a volume label
- (present only with DOS 2.0 and above). Under normal situations, volume labels
- will be found only in a disk's root directory. This attribute cannot be set or
- unset with AT, nor can other attributes be set on a entry which has this
- attribute.
-
- h - HIDDEN
-
- This attribute excludes files from ordinary DOS "dir" directory searches,
- as well as making them inaccessible to the "copy", "del", and "ren" commands.
- Such files may, however, be accessed by the "type" and "edlin" commands if you
- know their names. Note too that some utilities, such as the Norton Utilities++
- "FINDFILE" (and AT!) can list files regardless of their attribute settings.
- Subdirectories which are hidden are simply removed from the "dir" listing.
- They may still be accessed as usual with the "cd" command, removed with the
- "rd" command, and have a file within them accessed, if you know the name of the
- hidden directory. Note that such hidden directories will still be backed up as
- normal with the DOS "backup" command; and while they will not be listed by some
- DOS utilities, such as "tree", they will be listed by others such as "chkdsk"
- used with the "/v" option.
- The 'h' attribute will not prevent a data file from being read, and in
- most cases does not prevent a file from being executed or used by another
- program; for example AT.EXE may be hidden and still function just fine.
- However, there are some programs (because of the kind of DOS calls they use to
- access files) that cannot run with their HIDDEN attribute set. The best way to
- determine whether or not a given file will work in the hidden mode is to hide
- it and then attempt to use it.
- A WORD OF CAUTION ABOUT UNHIDING FILES: Many valid copy protection
- schemes involve the placing of hidden files on your disks or hard disk.
- Removal of the 'h' attribute from these files may interfere with the operation
- of their associated programs. Also, some software intentionally ignores hidden
- files (hard disk optimizers for example) as operating on these files (in this
- case relocating them on the disk) may cause the programs associated with them
- to be rendered inoperable. A good rule of thumb is to hide or unhide files you
- create, and to leave any hidden files created by software you use alone.
-
- s - SYSTEM
-
- This attribute is functionally equivalent to the HIDDEN attribute for data
- files and directories. However, an executable file cannot be run from the DOS
- command level if this attribute is set (the program may, however, be run by
- another program which calls it via the 4Bh DOS function call).
-
-
- x - UNUSED as of DOS 3.1
-
- y - UNUSED as of DOS 3.1
-
- ++ "Norton Utilities" is a registered trademark of Peter Norton
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 13
-
-
- What AT looks like in its various output forms as compared to DOS's "dir"
- command.
-
-
- DOS "dir" command:
-
-
-
-
- Volume in drive C is FIXED DISK
- Directory of C:\
-
- ASM <DIR> 4-10-86 2:52p
- BASIC <DIR> 1-08-85 1:18p
- CM <DIR> 4-28-86 11:47a
- CW <DIR> 4-13-86 12:33a
- DTA <DIR> 1-08-85 1:39p
- WRITING <DIR> 1-08-85 1:57p
- LOGLOG 2271 5-23-86 12:49p
- AUTOEXEC 2 246 4-06-86 10:13p
- AUTOEXEC BAT 283 5-06-86 11:33a
- 9 File(s) 13479936 bytes free
-
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 14
-
-
- The same directory with AT in the "wide" mode:
-
-
-
-
-
- ATTRIBUTES OF POWER (V2.2, DOS 2.0 or later; Copyright (c)1986 Brian Murphy)
-
- Volume in drive C is labeled: FIXED DISK
- Directory of C:\*.* [/w]
-
- _____hsr IBMBIO COM _____hsr IBMDOS COM ____v___ FIXED DISK
- ___d____ ASM <DIR> ___d____ BASIC <DIR> ___d____ CM <DIR>
- ___d____ CW <DIR> ___d_h__ DOS <DIR> ___d____ DTA <DIR>
- ___d_h__ FILE <DIR> ___d_h__ GAMES <DIR> ___d_h__ RESEARCH <DIR>
- ___d____ WRITING <DIR> __a_____ LOGLOG _______r AUTOEXEC 2
- __a____r AUTOEXEC BAT __a__h_r MPATH BAT _____h_r BASICA COM
- _____h_r CBASIC COM __a__h_r COMMAND COM _____h__ HENP DBU
- __a__h_r AT EXE _____h_r BASICA EXE _____h__ BWM0200 HEN
- _____h__ ASSERT LLP _____h__ DBATE OMS _____h__ ANSI SYS
- _____h_r CONFIG SYS _____h__ VDISK SYS
- Mon Sep 22, 1986 4:04:26 pm Total bytes: 376457 20855
- KB: 367.6 20.4
- 29 Entries found (18 proper files); listing is 5.2% slack.
- Drive C: 13479936 bytes free (13164.0KB or 45%); [cap:29496.0KB clust:2048]
-
- ATTRIBUTES OF POWER, V2.2; September 22, 1986 pg 15
-
-
- The same directory with AT used in the default "detailed" mode:
-
-
-
-
-
- ATTRIBUTES OF POWER (V2.2, DOS 2.0 or later; Copyright (c)1986 Brian Murphy)
-
- Volume in drive C is labeled: FIXED DISK
- Directory of C:\*.*
-
- _____hsr IBMBIO COM Mon Sep 30, 1985 12:00:00p 9728 25.0%
- _____hsr IBMDOS COM Mon Sep 30, 1985 12:00:00p 27760 44.5%
- ____v___ FIXED DISK Sat Apr 12, 1986 10:37:18a
- ___d____ ASM <DIR> Ths Apr 10, 1986 2:52:24p
- ___d____ BASIC <DIR> Tue Jan 8, 1985 1:18:48p
- ___d____ CM <DIR> Mon Apr 28, 1986 11:47:12a
- ___d____ CW <DIR> Sun Apr 13, 1986 12:33:44a
- ___d_h__ DOS <DIR> Tue Jan 8, 1985 1:15:18p
- ___d____ DTA <DIR> Tue Jan 8, 1985 1:39:26p
- ___d_h__ FILE <DIR> Tue Jan 8, 1985 1:52:18p
- ___d_h__ GAMES <DIR> Mon Apr 7, 1986 7:32:18p
- ___d_h__ RESEARCH <DIR> Ths May 22, 1986 11:48:18p
- ___d____ WRITING <DIR> Tue Jan 8, 1985 1:57:28p
- __a_____ LOGLOG Fri May 23, 1986 12:49:24p 2271 89.1%
- _______r AUTOEXEC 2 Sun Apr 6, 1986 10:13:48p 246 88.0%
- __a____r AUTOEXEC BAT Tue May 6, 1986 11:33:36a 283 86.2%
- __a__h_r MPATH BAT Tue May 6, 1986 11:26:36a 168 91.8%
- _____h_r BASICA COM Mon Sep 30, 1985 12:00:00p 1173 42.7%
- _____h_r CBASIC COM Mon Sep 30, 1985 12:00:00p 1175 42.6%
- __a__h_r COMMAND COM Mon Sep 30, 1985 12:00:00p 23210 66.7%
- _____h__ HENP DBU Mon Jul 16, 1983 10:44:44a 53760 75.0%
- __a__h_r AT EXE Ths May 22, 1986 3:51:08p 16707 84.2%
- _____h_r BASICA EXE Mon Sep 30, 1985 12:00:00p 66576 49.2%
- _____h__ BWM0200 HEN Fri Mar 14, 1986 3:48:34p 4096 0.0%
- _____h__ ASSERT LLP Mon Jul 16, 1984 10:44:48a 15223 56.7%
- _____h__ DBATE OMS Sat Nov 3, 1985 1:43:18p 149504 0.0%
- _____h__ ANSI SYS Mon Sep 30, 1985 12:00:00p 1593 22.2%
- _____h_r CONFIG SYS Sun Apr 6, 1986 5:20:14p 58 97.2%
- _____h__ VDISK SYS Mon Sep 30, 1985 12:00:00p 2926 57.1%
- Mon Sep 22, 1986 4:04:32 pm Total bytes: 376457 20855
- KB: 367.6 20.4
- 29 Entries found (18 proper files); listing is 5.2% slack.
- Drive C: 13479936 bytes free (13164.0KB or 45%); [cap:29496.0KB clust:2048]
-
-